package com.htc.service;

import java.util.List;

/**
 * 通用多结果Service返回结构
 *
 * @author: htc
 * @date: Created in 18:44 2018/5/23.
 */
public class ServiceMultiResult<T> {
    private long total;
    private List<T> result;

    public ServiceMultiResult(long total, List<T> result) {
        this.total = total;
        this.result = result;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getResult() {
        return result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }

    public int getResultSize() {
        return null == this.result ? 0 : this.result.size();
    }
}
